$(function() {
	$('#vue_vm_list div').hide();
});

var invoiceApply = {
	invoiceApplyId: '',
	startNumber: '',
	endNumber: '',
	applyTime: '',
	applyId: '',
	applyName: '',
	quantity: '',
	approveResult: '',
	getStatus: '',
	createId: getLoginedUser()? getLoginedUser().staffId: '',
	updateId: getLoginedUser()? getLoginedUser().staffId: '',
	createTime: '',
	updateTime: '',
};

function query() {
	if($('#vue_vm_list').length==0) {return;}
	$('#vue_vm_list div').hide();
	var yearMonth = $('#year').val() + '-' + $('#month').val();

	$.post(path+'/invoiceApply/findByMonth', {month:yearMonth}, function(response) {
		closeWaiting();
		
		if(response.code=='200') {
			if(response.data.length==0) {
				alert('找不到符合条件的记录');
				return;
			}
			
			$('#vue_vm_list').html(gl_vue_vm_list_html);
		
			new Vue({
				el: '#vue_vm_list',
				data: {
					todos: response.data
				}
			});
			
			$('#vue_vm_list div').show();
		}else {
			alert('页面链接=' + document.location.href);
			alert('code=' + response.code + ', info=' + response.info);
		}
		
		console.log(response);
	});
}

function deleteBatch() {
	deleteBatch_basic(path+'/invoiceApply/deleteBatch');
}
